/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.config;

import com.opensymphony.sitemesh.webapp.SiteMeshFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan(basePackages="com.thinkgem.jeesite.modules")
public class JeeSiteV1Config {

    @Bean
    public FilterRegistrationBean<SiteMeshFilter> sitemeshFilter() {
        FilterRegistrationBean<SiteMeshFilter> bean = new FilterRegistrationBean<>();
        bean.setFilter(new SiteMeshFilter());
        bean.addUrlPatterns("/a/v1/*", "/a/cms/*", "/f/*");
        return bean;
    }
}
